# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pscan
pkgver=1.3
pkgrel=4
groups=('blackarch' 'blackarch-code-audit')
pkgdesc='A limited problem scanner for C source files.'
url='http://deployingradius.com/pscan/'
arch=('x86_64' 'aarch64')
license=('GPL3')
source=("http://deployingradius.com/$pkgname/$pkgname.tar.gz")
sha512sums=('4c98b8b7b9ee3edf9f2ddd2ccb59e9210faf450a0d9ddaa527af1306bb67b883020059e1d3541073a973967832cd789c3867302bf5a41b7a0f3102d60f0822d6')

prepare() {
  sed -i 's/#CC/CC/' Makefile
  sed -i 's/#LEX/LEX/' Makefile
}

build(){
  make
}

package() {
  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
  install -Dm 655 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

